import React from 'react';
import ReactDOM from 'react-dom/client';

import App from './App';

// 5. 导入全局状态 store
import store from './store/index'

const root = ReactDOM.createRoot(document.getElementById('root'));

root.render(
    <App />
);

// 6. 订阅状态管理器改变时执行的操作
store.subscribe(()=>{
  root.render(<App />)
})